package com.shermanzhou.aop;

import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.aspectj.lang.annotation.Pointcut;
import org.springframework.stereotype.Component;

/**
 * @author zhouchaoqun
 * @date 2018/9/10 下午2:08
 */
@Aspect
@Component
public class CheckingIllegalCharacterAspect {

    @Pointcut("execution(public * com.shermanzhou.aop.HelloServiceImpl.sayHello(String))")
    public void pointCut(){}

    @Before("pointCut() && args(somebody)")
    public void checkingIllegalCharacter(String somebody) {
        System.out.println("hehe " + somebody);
    }
}
